package singleton.register.enumsingleton;

/**
 * 枚举实现单例
 * 优点：线程安全 反射和序列化不会破坏单例
 * 缺点：
 * @author lenovo
 *
 */
public enum EnumSingleton {
	INSTANCE;
	private Object data;
	public static EnumSingleton getInstance() {
		return INSTANCE;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public Object getData() {
		return data;
	}
	
}
